<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ page import="java.util.List"%><%@ page import="java.util.Arrays"%>
<%@ page import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Homepage</title>
<style type="text/css">
body {
	background-color: #FFE4E1;
}
</style>

</head>
<body>

<%@include file="header.jsp"%>
<br>
<%@include file="Page.jsp" %>
	<center>
		<h1>
			<b>EVENT HOME PAGE</b>
		</h1>
	</center>
	<br />
	<form action="CreateEvent.jsp">
		<center>
			<h1>
				<input type="submit" value=" Create New Event"/>
			</h1>
		</center>
	</form>
	<table border="3" cellpadding="5" cellspacing="3" align="center">

		<tr>
			<th><b>EventId</b>
			</th>
			<th><b>EventName</b>
			</th>
			<th><b>StartDate</b>
			</th>
			<th><b>EndDate</b>
			</th>
			<th><b>ClassSize</b>
			</th>
			<th><b>Fees</b>
			</th>
			<th><b>LocationId</b>			
			</th>
			<th><b>SpeakerName</b>			
			</th>
			<th><b>PromotionId</b>			
			</th>
			<th><b>Edit</b>
			</th>
		</tr>

		<c:forEach items="${a}" var="i">
			<tr>
				<td>${i.eventId} </td>
				<td>${i.eventName}</td>
				<td>${i.startDate}</td>
				<td>${i.endDate}</td>
				<td>${i.classSize}</td>
				<td>${i.fees}</td>
				<td>${i.locationBean.locationId}</td>
				<td>${i.userName}</td>
				<td>${i.promotionBean.proId}</td>
				
				<td><!--  <input type="button" value="Modify"/></td>-->
				<a href="/EventManagementSystem/EventModifyServlet?eventId=${i.eventId}&eventName=${i.eventName}&classSize=${i.classSize}&fees=${i.fees}&speakerName=${i.userName}&locationId=${i.locationBean.locationId}&proId=${i.promotionBean.proId}">Modify</a>
			</tr>
		</c:forEach>
	</table>
	<%@include file="Footer.jsp"%>
</body>
</html>